<template>
  <div class="proRight">
    <TabNav></TabNav>
    <div class="tableInfor">
      <div :is="item.components" v-show="index==Product_current_seclected"  :text="item.text" :key="item.id" :proid="item.dataId" :proSn="item.dataSn" v-for="(item,index) in tabList" :subNav="subnav"></div>
    </div>
  </div>
</template>
<script>
  import TabNav from "@/components/public/tabNav";
  import ProductProDefault from "@/components/product/product_pro_default";
  export default {
    data() {
      return {
        item: '产品管理',
        tabList: '',
        componentName: "ProductProDefault"
      };
    },
    props:['subnav'],
    // 放在computed中获取，因为computed可以自动获取
    computed:{
      Tab_List(){
        return this.$store.state.product.tabList;
      },
      Product_current_seclected(){
        return this.$store.state.product.curSeclected
      }
    },
    mounted(){
      var self = this;
      self.tabList = self.Tab_List;
    },
    components: {
      TabNav,
      ProductProDefault
    }
  };
</script>
